﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Oca35.Tests
{
    [TestClass]
    public class JailSquareFixture
    {
        [TestMethod]
        public void PlayerLooseTwoTurns()
        {
            var player = new Player();
            var jailsquare = new JailSquare();
            jailsquare.ApplyActions(player);
            Assert.IsFalse(jailsquare.CanPlay(player));
            Assert.IsFalse(jailsquare.CanPlay(player));
            Assert.IsTrue(jailsquare.CanPlay(player));
            Assert.IsTrue(jailsquare.CanPlay(player));
        }

        [TestMethod]
        public void TwoPlayersAreInTheSameJailSquare()
        {
            var player2 = new Player();
            var player = new Player();
            var hostelsquare = new HostelSquare();
            hostelsquare.ApplyActions(player);
            hostelsquare.ApplyActions(player2);
            Assert.IsFalse(hostelsquare.CanPlay(player));
            Assert.IsTrue(hostelsquare.CanPlay(player));
            Assert.IsFalse(hostelsquare.CanPlay(player2));
            Assert.IsTrue(hostelsquare.CanPlay(player2));
            Assert.IsTrue(hostelsquare.CanPlay(new Player()));
        }
    }
}
